function w = intp(v)
    n = size(v, 2);
    w = zeros(1, (n - 1) *2 + 1);
    w(1) = v(1);
    w(end) = v(end);
    w(3:2:end-2) = v(2:end-1);
    w(2:2:end-1) = (v(1:end-1) + v(2:end)) * 0.5;
end